<script>
export default {
  onLaunch: function() {
    console.log('App Launch');
    const isLoggedIn = uni.getStorageSync('isLoggedIn');
    if (!isLoggedIn) {
      uni.redirectTo({ url: '/pages/login/login' });
    }
  },
  onShow: function() {
    console.log('App Show')
  },
  onHide: function() {
    console.log('App Hide')
  },
  globalData: {
    cartProducts: [] // 全局购物车数据
  }
}
</script>

<style>
/* 全局样式 */
</style>